import { getStore } from '@/utils/store'
import ApplyTable from './ApplyTable.vue'
import SelfTable from './SelfTable.vue' // 自查表-暂时不用 下面的form 替换
import AreaApplyTable from './operateSubsidy/AreaApplyTable.vue'
import SelfTableForm from './operateSubsidy/SelfTableForm.vue'
import StatisticsTable from './operateSubsidy/StatisticsTable.vue'
import AreaStatisticsTable from './operateSubsidy/AreaStatisticsTable.vue'
import RespiteCare from './operateSubsidy/RespiteCare.vue'
import StatisticsTableBed from './operateSubsidy/StatisticsTableBed.vue'
import ApplyTableLianSuo from './operateSubsidy/LiShui/ApplyTableLianSuo.vue'
import Ls_StatisticsTable from './operateSubsidy/LiShui/StatisticsTable.vue'
import Ls_ApplyTable from './operateSubsidy/LiShui/ApplyTable.vue'

import BedApplyTable from './bedApply/BedApplyTable.vue'
import BedStatisticsTable from './bedApply/BedStatisticsTable.vue'
import BedSurvey from './bedApply/BedSurvey.vue'
import BedTheSecond from './bedApply/BedTheSecond.vue'

import AreaBedApplyTable from './bedApply/AreaBedApplyTable.vue'
import AreaBedHlApplyTable from './bedApply/AreaBedHlApplyTable.vue'
import AreaBedHlStatisticsTable from './bedApply/AreaBedHlStatisticsTable.vue'
import AreaBedHlSurvey from './bedApply/AreaBedHlSurvey.vue'
import AreaBedStatisticsTable from './bedApply/AreaBedStatisticsTable.vue'
import AreaBedSurvey from './bedApply/AreaBedSurvey.vue'
import AreaBedTheSecond from './bedApply/AreaBedTheSecond.vue'

import BedHlApplyTable from './bedApply/BedHlApplyTable.vue'
import BedHlStatisticsTable from './bedApply/BedHlStatisticsTable.vue'
import BedHlSurvey from './bedApply/BedHlSurvey.vue'
import BedHlSurveyForm from './bedApply/BedHlSurveyForm.vue'

import StaffEntryAllowance from './staffSubsidy/StaffEntryAllowance.vue'
import AreaStaffEntryAllowance from './AreaStaffEntryAllowance.vue'
import StaffPostAllowance from './staffSubsidy/StaffPostAllowance.vue'
import AreaStaffPostAllowance from './AreaStaffPostAllowance.vue'
import ElderStayAllowance from './fiveTypeElder/ElderStayAllowance.vue'
import ElderReliefApply from './fiveTypeElder/ElderReliefApply.vue'
import EntryApplyPromise from './staffSubsidy/EntryApplyPromise.vue'
import EntryOrgPromise from './staffSubsidy/EntryOrgPromise.vue'
import PostApplyPromise from './staffSubsidy/PostApplyPromise.vue'
import PostOrgPromise from './staffSubsidy/PostOrgPromise.vue'

// 浦口区床位补贴
// 普通
import PK_BedApplyTable from './PuKouTable/bedApply/BedApplyTable.vue'
import PK_BedStatisticsTable from './PuKouTable/bedApply/BedStatisticsTable.vue'
import PK_BedTheSecond from './PuKouTable/bedApply/BedTheSecond.vue'
// 护理
import PK_BedHlApplyTable from './PuKouTable/bedApply/BedHlApplyTable.vue'
import PK_BedHlStatisticsTable from './PuKouTable/bedApply/BedHlStatisticsTable.vue'
//机构综合运营
import PK_ApplyTable from './PuKouTable/operateSubsidy/ApplyTable.vue'
import PK_StatisticsTable from './PuKouTable/operateSubsidy/StatisticsTable.vue'
import PK_StatisticsTableBed from './PuKouTable/operateSubsidy/StatisticsTableBed.vue'
import PK_RespiteCare from './PuKouTable/operateSubsidy/RespiteCare.vue'
// 五类
import PK_ElderStayAllowance from './PuKouTable/fiveTypeElder/ElderStayAllowance.vue'
import PK_ElderReliefApply from './PuKouTable/fiveTypeElder/ElderReliefApply.vue'
// 从业人员
import PK_StaffEntryAllowance from './PuKouTable/staffSubsidy/StaffEntryAllowance.vue'
import PK_StaffPostAllowance from './PuKouTable/staffSubsidy/StaffPostAllowance.vue'
import medical_report_1001 from './MedicalSubsidy/ApplyTable.vue'
import fire_control_report_1001 from './FireControlReform/ApplyTable.vue'
import fire_control_report_1002 from './FireControlReform/MaterialForm.vue'

// 适老化改造
import AdaptElderlyChange from './AdaptElderlyChange.vue'

import xw_report_1001 from './XuanWuTable/operateSubsidy/ApplyTable.vue'
import xw_report_1004 from './XuanWuTable/operateSubsidy/StatisticsTable.vue'

import xw_bed_report_1001 from './XuanWuTable/bedApply/BedApplyTable.vue'
import xw_bed_hl_report_1001 from './XuanWuTable/bedApply/BedHlApplyTable.vue'

export const components = {
	// 机构运营补贴
	report_1001: ApplyTable,
	report_1002: SelfTableForm,
	report_1003: StatisticsTable,
	report_1004: StatisticsTableBed,
	report_1005: RespiteCare,
	report_1006: AreaApplyTable,
	report_1007: AreaStatisticsTable,
	report_1008: ApplyTableLianSuo,
	lishui_report_1004: Ls_StatisticsTable,
	lishui_report_1001: Ls_ApplyTable,

	// 养老机构新增床位补贴,
	bed_report_1001: BedApplyTable,
	bed_report_1002: BedStatisticsTable,
	bed_report_1003: BedHlSurveyForm, // BedSurvey,
	bed_report_1004: BedTheSecond,

	bed_report_1005: AreaBedApplyTable,
	bed_report_1006: AreaBedHlApplyTable,
	bed_report_1007: AreaBedHlStatisticsTable,
	bed_report_1008: AreaBedHlSurvey,
	bed_report_1009: AreaBedStatisticsTable,
	bed_report_1010: AreaBedSurvey,
	bed_report_1011: AreaBedTheSecond,

	// 改护理型床位补贴
	bed_hl_report_1001: BedHlApplyTable,
	bed_hl_report_1002: BedHlStatisticsTable,
	bed_hl_report_1003: BedHlSurveyForm, //BedHlSurvey,
	// 从业人员补贴
	area_staff_entry_report: AreaStaffEntryAllowance,
	area_staff_post_report: AreaStaffPostAllowance,
	staff_entry_report: StaffEntryAllowance,
	entry_apply_promise: EntryApplyPromise,
	entry_org_promise: EntryOrgPromise,

	staff_post_report: StaffPostAllowance,
	post_apply_promise: PostApplyPromise,
	post_org_promise: PostOrgPromise,

	// 五类老人补贴
	elder_stay_report: ElderStayAllowance,
	elder_relief_report: ElderReliefApply,

	//适老化改造
	elderly_change: AdaptElderlyChange,

	// 浦口床位(普通)
	PK_bed_report_1001: PK_BedApplyTable,
	PK_bed_report_1002: PK_BedStatisticsTable,
	PK_bed_report_1004: PK_BedTheSecond,
	// 浦口床位(护理)
	PK_bed_hl_report_1001: PK_BedHlApplyTable,
	PK_bed_hl_report_1002: PK_BedHlStatisticsTable,
	// 浦口机构运营
	PK_report_1001: PK_ApplyTable,
	PK_report_1003: PK_StatisticsTable,
	PK_report_1004: PK_StatisticsTableBed,
	PK_report_1005: PK_RespiteCare,
	// 浦口从业人员补贴
	PK_staff_entry_report: PK_StaffEntryAllowance,
	PK_staff_post_report: PK_StaffPostAllowance,

	// 浦口五类老人补贴
	PK_elder_stay_report: PK_ElderStayAllowance,
	PK_elder_relief_report: PK_ElderReliefApply,
	// 医疗机构床位改造补贴
	medical_report_1001,
	//养老机构消防改造补贴
	fire_control_report_1001,
	fire_control_report_1002,
	// 玄武
	xw_report_1001,
	xw_report_1004,

	xw_bed_report_1001,
	xw_bed_hl_report_1001,
}

// 根据补贴类型获取配置表格
export const tableDictConfig = (subsidyType: string | number) => {
	const strObj = {
		// 1 养老机构新增床位补贴,改护理型床位补贴
		1: [
			{ label: '新增床位申请表', value: 'bed_report_1001' },
			{ label: '新增床位审核表', value: 'bed_report_1002' },
			{ label: '新增床位实地勘察报告', value: 'bed_report_1003' },
			{ label: '第二笔补贴申请表', value: 'bed_report_1004' },

			{ label: '护理型床位补贴申请表', value: 'bed_hl_report_1001' },
			{ label: '护理型床位审核表', value: 'bed_hl_report_1002' },
			{ label: '实地勘察报告', value: 'bed_hl_report_1003' },
		],
		// 2 机构运营补贴
		2: [
			{ label: '申请表', value: 'report_1001' },
			{ label: '自查报告', value: 'report_1002' },
			{ label: '核算人员（机构内）统计表', value: 'report_1003' },
			{ label: '核算人员统计表', value: 'report_1004' },
			{ label: '喘息服务补贴核算人员统计表', value: 'report_1005' },
		],
		3: [],
		4: [],
		// 5 从业人员补贴
		5: [
			{ label: '南京市养老护理岗位工作人员入职奖励申请表', value: 'staff_entry_report' },
			{ label: '南京市养老护理岗位工作人员入职奖励申请人信用承诺书', value: 'entry_apply_promise' },
			{ label: '南京市养老护理岗位工作人员入职奖励用人单位信用承诺书', value: 'entry_org_promise' },
		],
		// 6 五类老人补贴
		6: [{ label: '政府养老扶助对象入住养老机构补助核准表', value: 'elder_stay_report' }],
		7: [],
		8: [],
		9: [{ label: '政府养老扶助对象入住养老机构减免、冲抵费用申请表', value: 'elder_relief_report' }],
		10: [
			{ label: '南京市养老服务机构从业人员岗位津贴申请表', value: 'staff_post_report' },
			{ label: '南京市养老服务机构从业人员岗位津贴申请人信用承诺书', value: 'post_apply_promise' },
			{ label: '南京市养老服务机构从业人员岗位津贴用人单位信用承诺书', value: 'post_org_promise' },
		],
	}
	return strObj[subsidyType]
}

// 根据补贴类型获取配置表格--六合补贴
export const tableDictConfigLiuHe = (subsidyType: string | number) => {
	const strObj = {
		// 1 养老机构新增床位补贴,改护理型床位补贴
		1: [
			{ label: '区新增床位申请表', value: 'bed_report_1005' },
			{ label: '区新增床位审核表', value: 'bed_report_1009' },
			{ label: '区新增床位实地勘察报告', value: 'bed_report_1003' },
			{ label: '区第二笔补贴申请表', value: 'bed_report_1011' },

			{ label: '区护理型床位补贴申请表', value: 'bed_report_1006' },
			{ label: '区护理型床位审核表', value: 'bed_report_1007' },
			{ label: '区实地勘察报告', value: 'bed_hl_report_1003' },
		],
		// 2 机构运营补贴
		2: [
			{ label: '区申请表', value: 'report_1006' },
			{ label: '自查报告', value: 'report_1002' },
			{ label: '区核算人员（机构内）统计表', value: 'report_1007' },
			{ label: '核算人员统计表', value: 'report_1004' },
			{ label: '喘息服务补贴核算人员统计表', value: 'report_1005' },
		],
		3: [],
		4: [],
		// 5 从业人员补贴
		5: [
			{ label: '区养老护理岗位工作人员入职奖励申请表', value: 'area_staff_entry_report' },
			{ label: '南京市养老护理岗位工作人员入职奖励申请人信用承诺书', value: 'entry_apply_promise' },
			{ label: '南京市养老护理岗位工作人员入职奖励用人单位信用承诺书', value: 'entry_org_promise' },
		],
		// 6 五类老人补贴
		6: [{ label: '政府养老扶助对象入住养老机构补助核准表', value: 'elder_stay_report' }],
		7: [],
		8: [],
		9: [{ label: '政府养老扶助对象入住养老机构减免、冲抵费用申请表', value: 'elder_relief_report' }],
		10: [
			{ label: '区养老服务机构从业人员岗位津贴申请表', value: 'area_staff_post_report' },
			{ label: '南京市养老服务机构从业人员岗位津贴申请人信用承诺书', value: 'post_apply_promise' },
			{ label: '南京市养老服务机构从业人员岗位津贴用人单位信用承诺书', value: 'post_org_promise' },
		],
	}
	return strObj[subsidyType]
}
// 根据补贴类型获取配置表格 溧水补贴
export const tableDictConfigLiShui = (subsidyType: string | number) => {
	const strObj = {
		// 1 养老机构新增床位补贴,改护理型床位补贴
		1: [
			{ label: '新增床位申请表', value: 'bed_report_1001' },
			{ label: '新增床位审核表', value: 'bed_report_1002' },
			{ label: '新增床位实地勘察报告', value: 'bed_report_1003' },
			{ label: '第二笔补贴申请表', value: 'bed_report_1004' },

			{ label: '护理型床位补贴申请表', value: 'bed_hl_report_1001' },
			{ label: '护理型床位审核表', value: 'bed_hl_report_1002' },
			{ label: '实地勘察报告', value: 'bed_hl_report_1003' },
		],
		// 2 机构运营补贴
		2: [
			{ label: '养老机构连锁运营补贴申请表', value: 'report_1008' },
			{ label: '申请表', value: 'lishui_report_1001' },
			{ label: '自查报告', value: 'report_1002' },
			{ label: '核算人员（机构内）统计表', value: 'lishui_report_1004' },
			{ label: '核算人员统计表', value: 'report_1004' },
			{ label: '喘息服务补贴核算人员统计表', value: 'report_1005' },
		],
		3: [],
		//4  医疗机构设立养老机构补贴
		4: [{ label: '床位改造补贴申请表', value: 'medical_report_1001' }],
		// 5 从业人员补贴
		5: [
			{ label: '南京市养老护理岗位工作人员入职奖励申请表', value: 'staff_entry_report' },
			{ label: '南京市养老护理岗位工作人员入职奖励申请人信用承诺书', value: 'entry_apply_promise' },
			{ label: '南京市养老护理岗位工作人员入职奖励用人单位信用承诺书', value: 'entry_org_promise' },
		],
		// 6 五类老人补贴
		6: [{ label: '政府养老扶助对象入住养老机构补助核准表', value: 'elder_stay_report' }],
		7: [],
		8: [],
		9: [{ label: '政府养老扶助对象入住养老机构减免、冲抵费用申请表', value: 'elder_relief_report' }],
		10: [
			{ label: '南京市养老服务机构从业人员岗位津贴申请表', value: 'staff_post_report' },
			{ label: '南京市养老服务机构从业人员岗位津贴申请人信用承诺书', value: 'post_apply_promise' },
			{ label: '南京市养老服务机构从业人员岗位津贴用人单位信用承诺书', value: 'post_org_promise' },
		],
		//养老机构消防改造补贴
		11: [
			{ label: '养老机构消防改造补贴申请表', value: 'fire_control_report_1001' },
			{ label: '养老机构消防改造申请材料', value: 'fire_control_report_1002' },
		],
	}
	return strObj[subsidyType]
}

// 根据补贴类型获取配置表格-玄武补贴
export const tableDictConfigXW = (subsidyType: string | number) => {
	const strObj = {
		// 1 养老机构新增床位补贴,改护理型床位补贴
		1: [
			{ label: '新增床位申请表', value: 'bed_report_1001' },
			{ label: '新增床位审核表', value: 'bed_report_1002' },
			{ label: '新增床位实地勘察报告', value: 'bed_report_1003' },
			{ label: '第二笔补贴申请表', value: 'bed_report_1004' },

			{ label: '护理型床位补贴申请表', value: 'bed_hl_report_1001' },
			{ label: '护理型床位审核表', value: 'bed_hl_report_1002' },
			{ label: '实地勘察报告', value: 'bed_hl_report_1003' },
		],
		// 2 机构运营补贴
		2: [
			{ label: '申请表', value: 'report_1001' },
			{ label: '自查报告', value: 'report_1002' },
			{ label: '核算人员（机构内）统计表', value: 'report_1003' },
			{ label: '核算人员统计表', value: 'report_1004' },
			{ label: '喘息服务补贴核算人员统计表', value: 'report_1005' },
		],
		3: [],
		4: [],
		// 5 从业人员补贴
		5: [
			{ label: '南京市养老护理岗位工作人员入职奖励申请表', value: 'staff_entry_report' },
			{ label: '南京市养老护理岗位工作人员入职奖励申请人信用承诺书', value: 'entry_apply_promise' },
			{ label: '南京市养老护理岗位工作人员入职奖励用人单位信用承诺书', value: 'entry_org_promise' },
		],
		// 6 五类老人补贴
		6: [{ label: '政府养老扶助对象入住养老机构补助核准表', value: 'elder_stay_report' }],
		7: [],
		8: [],
		9: [{ label: '政府养老扶助对象入住养老机构减免、冲抵费用申请表', value: 'elder_relief_report' }],
		10: [
			{ label: '南京市养老服务机构从业人员岗位津贴申请表', value: 'staff_post_report' },
			{ label: '南京市养老服务机构从业人员岗位津贴申请人信用承诺书', value: 'post_apply_promise' },
			{ label: '南京市养老服务机构从业人员岗位津贴用人单位信用承诺书', value: 'post_org_promise' },
		],
		//  养老机构新增床位补贴,改护理型床位补贴-玄武区级补贴
		12: [
			{ label: '新增床位申请表', value: 'xw_bed_report_1001' },
			{ label: '新增床位审核表', value: 'bed_report_1002' },
			{ label: '新增床位实地勘察报告', value: 'bed_report_1003' },

			{ label: '护理型床位补贴申请表', value: 'xw_bed_hl_report_1001' },
			{ label: '护理型床位审核表', value: 'bed_hl_report_1002' },
			{ label: '实地勘察报告', value: 'bed_hl_report_1003' },
		],
		//  机构运营补贴-玄武区
		13: [
			{ label: '申请表', value: 'xw_report_1001' },
			{ label: '自查报告', value: 'report_1002' },
			{ label: '核算人员统计表', value: 'xw_report_1004' },
		],
	}
	return strObj[subsidyType]
}
// 根据补贴类型获取配置表格--浦口补贴
export const tableDictConfigPuKou = (subsidyType: string | number) => {
	// 1 养老机构新增床位补贴,改护理型床位补贴
	const strObj = {
		1: [
			{ label: '新增床位申请表', value: 'PK_bed_report_1001' },
			{ label: '新增床位审核表', value: 'PK_bed_report_1002' },
			{ label: '新增床位实地勘察报告', value: 'bed_report_1003' },
			{ label: '第二笔补贴申请表', value: 'PK_bed_report_1004' },

			{ label: '护理型床位补贴申请表', value: 'PK_bed_hl_report_1001' },
			{ label: '护理型床位审核表', value: 'PK_bed_hl_report_1002' },
			{ label: '实地勘察报告', value: 'bed_hl_report_1003' },
		],
		// 2 机构运营补贴
		2: [
			{ label: '申请表', value: 'PK_report_1001' },
			{ label: '自查报告', value: 'report_1002' },
			{ label: '核算人员（机构内）统计表', value: 'PK_report_1003' },
			{ label: '核算人员统计表', value: 'PK_report_1004' },
			{ label: '喘息服务补贴核算人员统计表', value: 'PK_report_1005' },
		],
		3: [],
		4: [],
		// 5 从业人员补贴
		5: [
			{ label: '养老护理岗位工作人员入职奖励申请表', value: 'PK_staff_entry_report' },
			{ label: '养老护理岗位工作人员入职奖励申请人信用承诺书', value: 'entry_apply_promise' },
			{ label: '养老护理岗位工作人员入职奖励用人单位信用承诺书', value: 'entry_org_promise' },
		],
		// 6 五类老人补贴
		6: [{ label: '政府养老扶助对象入住养老机构补助核准表', value: 'PK_elder_stay_report' }],
		7: [],
		8: [],
		9: [{ label: '政府养老扶助对象入住养老机构减免、冲抵费用申请表', value: 'PK_elder_relief_report' }],
		10: [
			{ label: '养老服务机构从业人员岗位津贴申请表', value: 'PK_staff_post_report' },
			{ label: '养老服务机构从业人员岗位津贴申请人信用承诺书', value: 'post_apply_promise' },
			{ label: '养老服务机构从业人员岗位津贴用人单位信用承诺书', value: 'post_org_promise' },
		],
	}
	return strObj[subsidyType]
}

// 补贴表格配置
export const tableConfigOption = (subsidyType: string | number, areaId: number) => {
	const userInfo = getStore('userInfo') || {}
	switch (userInfo.authArea) {
		case 199961:
			return tableDictConfigPuKou(subsidyType)
			break
		case 200582:
			return tableDictConfigLiuHe(subsidyType)
			break
		case 200754:
			return tableDictConfigLiShui(subsidyType)
			break
		case 199556:
			return tableDictConfigXW(subsidyType)
			break
		default:
			return tableDictConfig(subsidyType)
			break
	}
}
